package io.renren.modules.api.service;

import io.renren.modules.api.entity.DriverTokenEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 * 
 * @author wangdajiang
 * @email 2750757088@qq.com
 * @date 2017-12-12 10:01:46
 */
public interface DriverTokenService {
	
	DriverTokenEntity queryObject(Long driverId);

	DriverTokenEntity queryByToken(String token);
	
	List<DriverTokenEntity> queryList(Map<String, Object> map);
	
	int queryTotal(Map<String, Object> map);
	
	void save(DriverTokenEntity driverToken);
	
	void update(DriverTokenEntity driverToken);
	
	void delete(Long driverId);
	
	void deleteBatch(Long[] driverIds);

	/**
	 * 生成带有前缀的token (司机用“SJ”，用户“YH”)
	 * @param userId  用户ID type类型
	 * @return        返回token相关信息
	 */
	Map<String, Object> createToken(long userId,String type);





}
